﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Untitled Page</title>
	<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.1/build/reset-fonts-grids/reset-fonts-grids.css" />
	<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/container/assets/skins/sam/container.css" />
	<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.5.2/build/button/assets/skins/sam/button.css" />
	<style type="text/css">
	</style>
</head>
<body class=" yui-skin-sam">
<div id="doc">
<div id="hd">
</div>
<div id="bd">
	<div class="yui-g">
		<div class="yui-u first">
		</div>
		<div class="yui-u">
		</div>
	</div>
	<div class="yui-gb">
		<div class="yui-u first">
		</div>
		<div class="yui-u">
		</div>
		<div class="yui-u">
		</div>
	</div>
</div>
<div id="ft">
</div>
</div>
<div id="toolbox">
	<div class="hd">工具箱</div>
	<div class="bd">
		<input type="button" id="btnAdd" name="add" value="添加控件" />
	</div>
</div>
</body>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/element/element-beta-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/button/button-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/dragdrop/dragdrop-min.js"></script>
<script type="text/javascript" src="http://yui.yahooapis.com/2.5.2/build/container/container-min.js"></script>
<script type="text/javascript">
YAHOO.util.Event.onContentReady("toolbox", function () {
	var btnAdd = new YAHOO.widget.Button("btnAdd");
	btnAdd.on("click", onAdd);
	var toolbox = new YAHOO.widget.Panel("toolbox", {
		visible:true,
		close:false,
		draggable:true,
		dragOnly:true,
		constraintoviewport:true,
		width:"300px"});
	toolbox.render();
});

function onAdd()
{
alert('add');
}
</script>
</html>
